<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "0,2";
$MM_donotCheckaccess = "true";
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  $isValid = False; 
  if (!empty($UserName)) { 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "../index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) 
  $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<script language="JavaScript" src="../js/jquery.js" type="text/javascript"></script>
<script language="JavaScript" src="../js/functions.js" type="text/javascript"></script>
<meta charset="utf-8" />
<link href="../css/trow_game_classic.css" rel="stylesheet" type="text/css">
<body>
<div id="head">Loading...<img src="../img/waiting.gif" width="12" height="12" alt=""></div>
<div id="main">Loading...<img src="../img/waiting.gif" width="48" height="48" alt=""></div>
<div id="control">Loading...<img src="../img/waiting.gif" width="12" height="12" alt=""></div>
<div id="foot">Loading...<img src="../img/waiting.gif" width="12" height="12" alt=""></div>
<div id="status">Loading...<img src="../img/waiting.gif" width="12" height="12" alt=""></div>
<div style="text-align: center; border-top: 2px solid #999; margin-top: 1em; font-size:12px">
<p><a href="#">帮助</a>·<a href="#">讨论</a>·<a href="#">项目页面</a>·<a href="#">Email作者</a></p>
<p style="font-size: 0.6em;">©2010 版权所有 BX trow.cn</p>
</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
	$("#status").hide(); 
	$("#status").slideDown();
	status("正在读入人物信息。");
	$("#foot").load("check_char_stat.php");
});
</script>
